package edu.poly.game.board;

import edu.poly.game.battleship.BattleShip;
import edu.poly.game.player.MissileFireResult;
import edu.poly.game.util.Coordinate;

/**
 * object representing an actual game board, and contains ships
 * the number of ship should not be controlled here, game board
 * is game board
 * @author kevint
 *
 */
public interface GameBoard {
	
	/**
	 * game board width
	 * @return
	 */
	int getWidth();
	
	/**
	 * game board height
	 * @return
	 */
	int getHeight();
	
	/**
	 * adds a battleship onto the board
	 * @param battleShip
	 * @return true if successfully placed on board, false otherwise
	 */
	boolean addBattleShip(final BattleShip battleShip);
	
	/**
	 * receives missile hit
	 * missile fire should not be taken care of in battleship
	 * because we also need to record missile miss, so game board
	 * should keep track of where ships are, and if a missile fire has missed
	 * 
	 * missed coordinate is represented with X
	 * @param missileCoordinate
	 * @return
	 */
	MissileFireResult receiveMissileHit(final Coordinate missileCoordinate);
	
	/**
	 * convenient method for asking the game board is there's more ships on the board
	 * that are active and not destroyed
	 * @return
	 */
	boolean hasShipsActive();
	
	char[][] getGameBoard();
}
